<!DOCTYPE HTML>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>{{$pageName ?? ''}}-{{\App\Facade\AppContext::appName()}}</title>
    @include('admin.header')
    @stack('style')
</head>
<body class="theme-cyan">
@yield('body')
@include('admin.footer')
<script type="text/javascript">
    layui.use(["element", "form"], function () {
        let form = layui.form;
        form.on("submit(ajaxForm)", function (data) {
            SystemUtil.ajax(data.form.action)
                .setData(data.field)
                .send(1)
                .done(function () {
                    layer.msg("@lang('common.tips.operation_successful')");
                    setTimeout(function(){
                        parent.listTableInc.tableInc.reload();
                        parent.layer.close(parent.layer.getFrameIndex(window.name));
                    },3000);
                });
            return false;
        });
    })
</script>
@stack('script')
</body>
</html>
